# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: kpcyrd <git@rxv.cc>

pkgname=usbctl
pkgver=1.0
pkgrel=1
pkgdesc='Linux-hardened deny_new_usb control'
url='https://github.com/anthraxx/usbctl'
arch=('any')
license=('MIT')
depends=('linux-hardened' 'bash' 'usbutils' 'coreutils' 'diffutils' 'procps-ng' 'grep' 'util-linux')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/anthraxx/${pkgname}/archive/${pkgver}/${pkgver}.tar.gz
        ${pkgname}-${pkgver}.tar.gz.sig::https://github.com/anthraxx/usbctl/releases/download/${pkgver}/${pkgver}.tar.gz.sig)
sha512sums=('0f16297188439d10c1dcff6368ec830c4f665e05c01790383791cb207bda5667416c8f3b662173e6d7c5ffac2ef2b83593889b0e76a4a061129df5128bf2f4f6'
            'SKIP')
validpgpkeys=('E240B57E2C4630BA768E2F26FC1B547C8D8172C8') # Levente Polyak

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 usbctl -t "${pkgdir}/usr/bin"
  install -Dm 644 contrib/systemd/deny-new-usb.service -t "${pkgdir}/usr/lib/systemd/system"
  install -Dm 644 contrib/completion/bash/usbctl -t "${pkgdir}/usr/share/bash-completion/completions"
  install -Dm 644 contrib/completion/zsh/_usbctl -t "${pkgdir}/usr/share/zsh/site-functions"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et:
